package extend.代码块执行顺序;

public class First {
    static {
        System.out.println("父类静态代码块");
    }

    {
        System.out.println("父类构造代码块");
    }
    public First() {
        System.out.println("父类构造方法");
    }
}

class Second extends First {
    static {
        System.out.println("子类静态代码块");
    }
    {
        System.out.println("子类构造代码块");
    }
    public Second() {
        System.out.println("子类构造方法");
    }
    public static void main(String[] args) {
        new Second();
    }
}